import * as TYPES from "../action-types"
import { queryUserInfo } from "../../api"
const baseAction = {
    async queryUserInfoAsync() {
        let { code, data: info } = await queryUserInfo();
        if (code) {
            return { type: '', info }
        }
        return { type: TYPES.BASE_INFO, info }
    },

    clearUserInfo() {
        return {
            type: TYPES.BASE_INFO,
            info: null
        };
    }
}

export default baseAction